<template>
  <el-tooltip :disabled="disabled" v-bind="$attrs">
    <slot />
  </el-tooltip>
</template>

<script>
export default {
  data() {
    return {
      disabled: false
    }
  },
  computed: {

  },
  mounted() {
    const contentElement = this.$el
    const parentElement = this.$el?.parentElement
    this.disabled = !(contentElement.offsetWidth + contentElement.offsetLeft > parentElement.offsetWidth)
  }
}
</script>

